home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
PGM_TOOL
/
PREVIEW
/
CLP2DLFI
/
TF.PRG
< prev
next >
Wrap
Text File
|
1995-10-29
|
4KB
|
187 lines
local ii,jj,kk,line,mii[5],getlist:={},yy
local ff:=0,tt:="test"
static jkj,klkl,xx1[5][6][9]
public pub[10][13]
declare zz[5][10],xx[10][10] // test for back to back square brackets
declare alleeo[5][10] && test comment
* test pattern
&& test changing of database commands
ii=fcount()
tt=fieldname(4)
eof()
? emp->(eof())
? bof()
emp->(bof())
? deleted()
emp->(deleted())
emp->(dbdelete())
dbdelete()
? rlock()
emp->(rlock())
go 55
dbgoto(55)
emp->(dbgoto(55))
emp->(dbdelete())
? recno()
ii=sample->(recno())
if emp->(lockit()) .and. custnum=partnum
ii=0
endif
if emp->(lockit(.t.)) .and. custnum=partnum
ii=0
endif
if emp->(rlock()) .and. custnum=partnum
ii=0
endif
emp->(unlockit())
append blank
dbappend()
emp->(dbappend())
emp->(dbclosearea())
dbclosearea()
emp->(clozdbf())
skip
skip -1
dbskip(2)
dbskip()
emp->(dbskip())
emp->(dbskip(-1))
lockit()
clozdbf()
unlockit()
seek keychar
dbseek("1011")
seek "1014"
seek descend("1014")
if found() // is acceptable, however an mxseek() would be better
endif
emp->(dbseek(empnum))
emp->(found())
if !emp->(dbseek(pvar(30))) .and. cust->(dbseek(datehyph(custnum)))
endif
if !emp->(dbseek("001")) .and. cust->(dbseek(custnum))
emp->name:="tom jackson"
emp->cust_no:=testpat
emp->(dbsetorder(1))
endif
set order to 2
set order to tag emp2 && test of set order to tag
set order to tag "emp2" && test of set order to tag
dbsetorder("emp") && test of dbsetorder(<tag>)
state->(dbsetorder("emp"))
dbsetorder(1)
state->(dbsetorder(1))
close all
set softseek on
&& test printer conversions
@ prow(),pcol() say "test pattern"
@ line,pcol() say "test pattern"
@ prow(),5 say "test pattern"
@ prow(),5 say ii pict "99,999.99"
@ 5,0 say"test pattern"
@ 8,5 say ii pict "99,999.99"
setprc(0,5)
eject
&& test miscellaneous conversions and indenting
// test comment change
getlist={}
getlist:={}
anarry:={}
clear screen
ii=achoice(1,2,34,4,test,.t.,"",9)
ii=asort(ff,1,acnt)
ii=adir(skeleton,anarr)
for ii=1 to 10
afill(aa[ii],0)
next
ii=0 // test for comment
? ii==jj && test for double equal
? ii!=jj && test for not equal
readmodal(getlist)
if(ii>10,11,123)
ii=if(ii>10,11,123)
ii=iif(ii>10,11,123)
if !(ii==jj) .and. !kk
? ii
endif
line++
line--
++line
--line
line+=jj+2
line-=jj*4
xxx[5][10]++
? ii % jj // test for conversion to mod function
custnum="jkljlk"
partnum="jkljlk"
@ 5,0 say "this is a test of the multi-line combining for mxr()"+ ;
"jjjjj cjjjjjj j j j jj jj j jj jj j"+ ;
"jjjjj cjjjjjj j j j jj jj j jj jj j"
@ 5,0 say "this is a test of the multi-line combining for "+ ;
"jjjjj cjjjjjj j j j jj jj j jj jj j"+ ;
"jjjjj cjjjjjj j j j jj jj j jj jj j" get partnum
@ 6,0 get test pict "@!"
read
xxx[5][10]++
use empinfo
report form testform for .not. empty(emp_no) heading "Test Heading" to printer
&& convert by hand to:
&& devtopr()
&& frmrep("testform",".not. empty(emp_no)","Test Heading")
&& devtoscr()
alleeo[mfoffset+race][skill]++
&& test "@ prompt" and "menu to" conversion
procedure test1
parameters one,two
local ii,jj,kk,arr[10],arr3[10][20],mm,zz,arr4[10,20]
static tii,tarr[10],tzz,tarr3[10][20],tarr2[110,20]
private ff,gg[10],hh[10][20][10]
ii=0
jj=10
@ 5,0 say "test pattern to check and see if it will show"+;
" additional lines in the FIX file"+ ;
" additional lines in the FIX file"
@ 5,0 prompt "one"
set message to 18
@ 5,col()+2 prompt "two" mess "at two"
@ 7,10 prompt "three" mess "at three"
menu to ii
@ 5,0 say "test pattern" get tt valid !empty(tt)
read
@ 5,0 prompt "one"
@ 5,col()+2 prompt "two" mess "at two"
@ 7,10 prompt "three" mess "at three"
menu to ii
@ 5,0 get tt valid !empty(tt)
read
function test2(p1,p2,p3, ;
p4,p5)
local ii,jj,kk,arr[10],arr3[10][20],mm,zz,arr4[10,20]
static tii,tarr[10],tzz,tarr3[10][20],tarr2[110,20]
private ff,gg[10],hh[10][20][10]
ii=0
jj=10
@ 5,0 prompt "one"
@ 5,col()+2 prompt "two" mess "at two"
@ 7,10 prompt "three" mess "at three"
menu to ii